#define _CRT_SECURE_NO_WARNINGS 0
#include <stdio.h>
#include <string.h>
#include <assert.h>

union Un
{
	short arr[7];
	int i;
};

void* my_memcpy(void* dest, const void* src, size_t num) //1
{
	assert(dest && src);
	void* p = dest;
	while (num--)
	{ // ego-centered.ver is const char*src 
		*(char*)dest = *(char*)src;
		dest = (char*)dest + 1;
		src = (char*)src + 1;
	}
	return p;
}
void test()
{
	int arr1[] = { 1,2,3,4,5,6,7,8,9,10 };
	int arr2[11] = { 0 };
	memcpy(arr1 + 2, arr1, 19);  // 
	int i = 0;
	for (i = 0; i < 10; i++)
	{
		printf("%d\n", arr1[i]);
	}
}

void* my_memmove(void* dest, const void* src, size_t num)
{
	assert(dest && src);

}
void test1()
{
	int arr1[] = { 1,2,3,4,5,6,7,8,9,10 };
	int arr2[11] = { 0 };
	memcpy(arr1 + 2, arr1, 19);  // 
	int i = 0;
	for (i = 0; i < 10; i++)
	{
		printf("%d\n", arr1[i]);
	}
}
int main()
{
	//char roge[] = "RogeAustine";
	//char au[] = "austine";
	test1();
	//Soon coming memmove!!!!
	
	return 0;
}